// JavaScript Document
 $(document).ready(function(){
    (function(){
            $('#dowebok').fullpage({
            anchors: ['page1', 'page2', 'page3', 'page4','page5'],
               menu: '#menu',

            afterLoad: function(anchorLink, index){
        
            
            },
            onLeave: function(index,nextIndex,direction){
            $(".tubiao_danghang").css("background-position",--nextIndex*-38+"px top" );
            if(nextIndex == 1){
            $(".section2_soluction_top ").addClass('section2_dh')
            $(".row_left ").removeClass('row_left_dh')
            $(".row_right ").removeClass('row_right_dh')
                }
                if(nextIndex == 2){
            $(".row_left ").addClass('row_left_dh')
            $(".row_right ").addClass('row_right_dh')

             $(".section2_soluction_top ").removeClass('section2_dh')
             $('.soluction_left_line').removeClass('soluction_left_line_dh')
             $('.soluction_left_text').removeClass('soluction_left_text_dh')
             $('.soluction_left_nav1').removeClass('soluction_left_nav1_dh')
             $('.soluction_left_nav2').removeClass('soluction_left_nav2_dh')
             $('.soluction_left_nav3').removeClass('soluction_left_nav3_dh')
             $('.soluction_middle_text').removeClass('soluction_middle_text_dh')
             $('.soluction_right_nav3_img').removeClass('soluction_right_nav3_img_dh')
                }else if(nextIndex == 0){
             $(".section2_soluction_top ").removeClass('section2_dh')
          }
                if(nextIndex == 3){
             $('.soluction_left_line').addClass('soluction_left_line_dh')
             $('.soluction_left_text').addClass('soluction_left_text_dh')
             $('.soluction_left_nav1').addClass('soluction_left_nav1_dh')
             $('.soluction_left_nav2').addClass('soluction_left_nav2_dh')
             $('.soluction_left_nav3').addClass('soluction_left_nav3_dh')
             $('.soluction_middle_text').addClass('soluction_middle_text_dh')
             $('.soluction_right_nav3_img').addClass('soluction_right_nav3_img_dh')
             $(".row_left ").removeClass('row_left_dh')
             $(".row_right ").removeClass('row_right_dh')
			  $('.section5_contact1 .section5_contact_text').removeClass('section5_contact_text_dh')
             $('.section5_contact1 .section5_contact_we').removeClass('section5_contact_we_dh')


                }
          if(nextIndex ==4){
             $('.soluction_left_line').removeClass('soluction_left_line_dh')
             $('.soluction_left_text').removeClass('soluction_left_text_dh')
             $('.soluction_left_nav1').removeClass('soluction_left_nav1_dh')
             $('.soluction_left_nav2').removeClass('soluction_left_nav2_dh')
             $('.soluction_left_nav3').removeClass('soluction_left_nav3_dh')
             $('.soluction_middle_text').removeClass('soluction_middle_text_dh')
             $('.soluction_right_nav3_img').removeClass('soluction_right_nav3_img_dh')
			   
			 $('.section5_contact1 .section5_contact_text').addClass('section5_contact_text_dh')
             $('.section5_contact1 .section5_contact_we').addClass('section5_contact_we_dh')

          }                  
		 
        }
		
      });
    })();
	 (function(){
                     var num = 0
                     var timer
                     $(".but_dian span").click(function(event){
                             var liIndex = $(this).index()
                            $(this).addClass("current").stop().siblings().removeClass("current");
                            $(".ban_img li").eq(liIndex).stop().fadeIn(300).siblings().fadeOut(300);
                            num = liIndex
                         })
                     function autoPlay(){
                         num++;
                         if(num>3){
                            num=0
                         }
                         $(".ban_img li").eq(num).fadeIn(300).siblings().stop().fadeOut(300);
                         $(".but_dian span").eq(num).addClass("current").siblings().stop().removeClass("current")
                     }
                     timer = setInterval(autoPlay,4000)
                      $('.but_dian span').mouseenter(function(event) {
                         clearInterval(timer)
                     });
                     $('.but_dian span').mouseleave(function(event) {
                         clearInterval(timer)
                          timer = setInterval(autoPlay,4000)  
                     });
         
                })();
    
 })